home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / lang / p_image1.sit / LSP Source / Globals.p < prev    next >
Encoding:
Text File  |  1989-07-29  |  16.8 KB  |  551 lines

  1. unit Globals;
  2.  
  3. {Global declarations for Image program.}
  4.  
  5. interface
  6.  
  7.     uses
  8.         QuickDraw, PrintTraps;
  9.  
  10.     const
  11.         Version = 116;
  12.  
  13.     const
  14.         AppleMenu = 128;
  15.         FileMenu = 129;
  16.         EditMenu = 130;
  17.         OptionsMenu = 131;
  18.  
  19.         FunctionsMenu = 132;
  20.         SmoothItem = 1;
  21.         SharpenItem = 2;
  22.         EdgeDetectItem = 3;
  23.         ReduceNoiseItem = 4;
  24.         DitherItem = 5;
  25.         ConvolveItem = 6;
  26.         PhotoModeItem = 8;
  27.         AnimateItem = 9;
  28.         EnhanceItem = 10;
  29.         EqualizeItem = 11;
  30.         ApplyItem = 12;
  31.         BinaryItem = 13;
  32.         ChangeItem = 14;
  33.         SortItem = 15;
  34.         UnZoomItem = 16;
  35.         StartItem = 18;
  36.         AverageItem = 19;
  37.         SetVideoItem = 20;
  38.  
  39.         BinaryMenu = 35; {Sub Menu}
  40.         MakeBinaryItem = 1;
  41.         ErosionItem = 3;
  42.         DilationItem = 4;
  43.         OpeningItem = 5;
  44.         ClosingItem = 6;
  45.         OutlineItem = 8;
  46.         SkeletonizeItem = 9;
  47.  
  48.         AnalysisMenu = 133;
  49.         MeasureItem = 1;
  50.         ShowItem = 2;
  51.         OptionsItem = 3;
  52.         HistogramItem = 4;
  53.         PlotItem = 5;
  54.         Plot3DItem = 6;
  55.         SaveBlankFieldItem = 8;
  56.         SetScaleItem = 9;
  57.         CalibrateItem = 10;
  58.         ResetItem = 11;
  59.         RestoreItem = 12;
  60.         NumberSelectionItem = 13;
  61.  
  62.         TextMenu = 134;
  63.         LeftItem = 5;
  64.         CenterItem = 6;
  65.         RightItem = 7;
  66.         NoBackgroundItem = 9;
  67.         WithBackgroundItem = 10;
  68.  
  69.         FontMenu = 32; {Sub Menus}
  70.         SizeMenu = 33;
  71.         StyleMenu = 34;
  72.  
  73.         WindowsMenu = 138;
  74.  
  75.         UserMenu = 139;
  76.  
  77.         HeaderSize = 512;
  78.         TiffDirSize = 256;
  79.         MaxPixelsPerLine = 2048;
  80.         tleft = 36;
  81.         ttop = 40;
  82.         twidth = 44;
  83.         tmiddle = 22;
  84.         theight = 277;
  85.         gmleft = 2;
  86.         gmtop = 338;
  87.         gmwidth = 78;
  88.         gmheight = 118;
  89.         gmRectLeft = 7;
  90.         gmRectTop = 6;
  91.         gmRectRight = 71;
  92.         gmRectBottom = 70;
  93.         gmSlideWidth = 68;
  94.         gmSlideHeight = 7;
  95.         gmSlide1Offset = 8;
  96.         gmSlide2Offset = 19;
  97.         gmIconWidth = 17;
  98.         gmIconHeight = 14;
  99.         gmIconOffset = 31;
  100.         gmIcon1Left = 17;
  101.         gmIcon2Left = 46;
  102.         cleft = 2;
  103.         ctop = 40;
  104.         cwidth = 30;
  105.         rwidth = 200;
  106.         rheight = 175;
  107.         hleft = 220;
  108.         hwidth = 256;
  109.         hheight = 120;
  110.         MaxPseudoColors = 32;
  111.         MaxPseudoColorsLessOne = 31;
  112.         PicKind = 88;
  113.         HistoKind = 89;
  114.         ProfilePlotKind = 90;
  115.         LUTKind = 91;
  116.         GrayMapKind = 92;
  117.         ToolKind = 93;
  118.         ResultsKind = 94;
  119.         CalibrationPlotKind = 95;
  120.         PasteControlKind = 96;
  121.         IOErrorID = 400;
  122.         MessageID = 300;
  123.         AboutID = 256;
  124.         VersItem = 2;
  125.         MemItem = 3;
  126.         StackSize = 40000;
  127.         ToolFont = 249;      {Bits 7-14 of font resource ID(31884) }
  128.         nItems = 10;          {Items in Windows menu before pics}
  129.         MaxPicsInMenu = 21;  {31-nItems}
  130.         ho = 2;
  131.         vo = 4;
  132.         WhiteC = 0;
  133.         BlackC = 255;
  134.         OvalSize = 15;
  135.         LinesLeft = 13;
  136.         LinesRight = 40;
  137.         nLinetypes = 6;
  138.         CheckMarkChar = 65;
  139.         TxPlain = 1;
  140.         TxBold = 2;
  141.         TxItalic = 3;
  142.         TxUnderLine = 4;
  143.         TxOutLine = 5;
  144.         TxShadow = 6;
  145.         FileID8 = 'IPICIMAG';
  146.         DefaultBufferSize = 307200; {Enough for 640x480 Pic}
  147.         PickerCursorID = 111;
  148.         LUTCursorID = 112;
  149.         gmCursorID = 113;
  150.         GrabberCursorID = 114;
  151.         PencilCursorID = 115;
  152.         CrossCursorID = 117;
  153.         CrossCursorPlusID = 118;
  154.         CrossCursorMinusID = 119;
  155.         BucketCursorID = 120;
  156.         GlassCursorPlusID = 121;
  157.         GlassCursorMinusID = 122;
  158.         WandCursorID = 123;
  159.         AppleDefaultCLUT = 8;
  160.         SpectrumCLUT = 200;
  161.         KlutzID = 200;
  162.         PixelPaintID = 999;
  163.         GhostWindow = $A84;
  164.         GrayRgnGlobal = $9EE;
  165.         MBarHeight = $BAA;
  166.         MaxPics = 200;
  167.         NoColor = -1;
  168.         FirstExtraColorsEntry = 1;
  169.         MaxExtraColors = 6;
  170.         MaxExtraPlus2 = 8;
  171.         ExtraColorsHeight = 10;
  172.         MyMaxLong = 2000000000;
  173.         MaxTextBufSize = 10000;
  174.         MaxLengths = 100;
  175.         MaxLocs = 500;
  176.         MaxAreas = 200;
  177.         MaxStandards = 20;
  178.         BadReal = 999999.999;
  179.         NoValue = -999999.999;
  180.         TabSpacing = 12;
  181.         MaxPolyVertices = 4000;
  182.         pi = 3.14159265;
  183.         ValuesVStart = 11;
  184.         ValuesHStart = 4;
  185.     {TIFF Constants}
  186.         short = 3;
  187.         long = 4;
  188.         SubFileType = 255;
  189.         ImageWidth = 256;
  190.         ImageLength = 257;
  191.         BitsPerSample = 258;
  192.         Compression = 259;
  193.         PhotoInterp = 262;
  194.         StripOffsets = 273;
  195.         RowsPerStrip = 278;
  196.         ImageHdrTag = -22222; {43314}
  197.         TiffFillerSize = 80;
  198.         RoiHandleSize = 5;
  199.         CancelResetID = 3;
  200.         npcItems = 8;
  201.         blend = 32;
  202.         LeftArrow = 28;
  203.         RightArrow = 29;
  204.         UpArrow = 30;
  205.         DownArrow = 31;
  206.  
  207.     type
  208.         BitMapHandle = ^BitMapPtr;
  209.         BitMapPtr = ^BitMap;
  210.         UnsignedByte = 0..255;
  211.         LineType = packed array[0..MaxPixelsPerLine] of UnsignedByte;
  212.         ClutTable = packed array[0..255] of integer;
  213.         ColorArray = packed array[0..MaxPseudoColorsLessOne] of byte;
  214.         ColorArrayX = packed array[0..MaxPseudoColorsLessOne] of integer;
  215.         PicType = (pdp11, NewPicture, normal, PictFile, Leftover, imported, camera, NullPicture, BlankField, TiffFile, InvertedTIFF, FourBitTIFF, DebugWindow, ScionType);
  216.         LUTModeType = (ColorPalette, AppleDefault, Spectrum, GrayScale, Custom, CustomGrayscale);
  217.         ExtraColorsArray = array[1..MaxExtraColors] of rgbColor;
  218.         MyCSpecArray = array[0..255] of ColorSpec;
  219.         CoefficientArray = array[1..6] of double;
  220.         CurveFitType = (StrightLine, Poly2, Poly3, Poly4, Poly5, ExpoFit, PowerFit, LogFit);
  221.         PicHeader = record
  222.                 FileID: packed array[1..8] of char; {8  8}
  223.                 hnlines: integer;                    {2  10}
  224.                 hPixelsPerLine: integer;        {2  12}
  225.                 hversion: integer;                   {2  14}
  226.                 hLutMode: LutModeType;          {2  16}
  227.                 hnColors: integer;                   {2  18}
  228.                 hr, hg, hb: ColorArray;              {96 114}
  229.                 hColorStart: integer;                {2  116}
  230.                 hColorWidth: integer;                {2  118}
  231.                 hExtraColors: ExtraColorsArray;      {36 154}
  232.                 hnExtraColors: integer;              {2  156}
  233.                 hForegroundColor: integer;           {2  158}
  234.                 hBackgroundColor: integer;           {2  160}
  235.                 hScale: double;                      {8  168}
  236.                 Unused2: integer;                    {2  170}
  237.                 hUnits: packed array[1..2] of char; {2  172}
  238.                 hUnitsID: integer;                   {2  174}
  239.                 hp1x, hp1y, hp2x, hp2y: integer;     {8  182}
  240.                 hfit: CurveFitType;                  {2  184}
  241.                 hnCoefficients: integer;           {2  186}
  242.                 hCoeff: CoefficientArray;         {48 234}
  243.                 hUM: string[15];                   {16 250}
  244.                 hContainsOutline: boolean;       {1  251}
  245.                 hBinaryPic: boolean;                {1  252}
  246.                 UnusedBytes: packed array[1..260] of byte;
  247.             end;
  248.         PicInfo = record
  249.                 nlines, PixelsPerLine: integer;
  250.                 PicSize: LongInt;
  251.                 PicBaseAddr: ptr;
  252.                 osPort: cGrafPtr;         {Offscreen Port}
  253.                 PicRect: rect;
  254.                 roiRect, osRoiRect: rect;
  255.                 osroiRgn: rgnHandle;
  256.                 RoiType: (RgnRoi, RectRoi, OvalRoi, RoundRectRoi, NoRoi);
  257.                 SrcRect: rect;
  258.                 wrect: rect;
  259.                 savewrect: rect;
  260.                 RoiShowing: boolean;
  261.                 title: string[25];
  262.                 NewPic: boolean;
  263.                 Magnification: extended;
  264.                 vref: integer;
  265.                 PictureType: PicType;
  266.                 wptr: WindowPtr;
  267.                 PicNum: integer;
  268.                 ScaleToFitWindow: boolean;
  269.                 Changes: boolean;
  270.                 nColors: integer;
  271.                 RedX, GreenX, BlueX: ColorArrayX;
  272.                 ColorStart, ColorWidth: integer;
  273.                 LUTMode: LUTModeType;
  274.                 cTable: MyCSpecArray;
  275.                 BytesPerRow: integer;
  276.                 PixMapSize: LongInt;
  277.                 Scale: extended;
  278.                 units: string[2];
  279.                 UnitOfMeasure: string[15];
  280.                 UnitsID: integer;
  281.                 p1x, p1y, p2x, p2y: integer; {Control points for grayscale transfer function}
  282.                 DeltaX, DeltaY: integer;
  283.                 HeaderOffset: LongInt;
  284.                 ImageDataOffset: LongInt;
  285.                 Fit: CurveFitType;
  286.                 nCoefficients: integer;
  287.                 Coefficient: CoefficientArray;
  288.                 Calibrated: boolean;
  289.                 BinaryPic: boolean;
  290.             end;
  291.         InfoPtr = ^PicInfo;
  292.         ToolType = (MagnifyingGlass, SelectionTool, Grabber, OvalSelectionTool, Pencil, PolygonTool, Eraser, FreehandTool, Brush, RoundedRectTool, ruler, LUTTool, PaintBucket, TextTool, PlotTool, AirbrushTool, Wand, PickerTool, AngleTool, PointingTool);
  293.         OpType = (InvertOp, PaintOp, FrameOp, EraseOp, PasteOp, AddOp, SubtractOp, MultiplyOp, DivideOp);
  294.         ObjectType = (lineObj, oval, SelectionOval, Rectangle, RoundedRect, PlotLine, SelectionRect, LengthObj, BrushObj);
  295.         FilterType = (WeightedAvg, UnweightedAvg, fsharpen, fshadow, EdgeDetect, ReduceNoise, dither, erosion, dilation, OutlineFilter, skeletonize);
  296.         rhptr = ^RgnHandle;
  297.         FlipRotateType = (RotateLeft, RotateRight, FlipVertical, FlipHorizontal);
  298.         TextJustType = (LeftJust, CenterJust, RightJust);
  299.         TextBackType = (NoBack, WithBack);
  300.         HistogramType = array[0..255] of LongInt;
  301.         str4 = packed array[1..4] of char;
  302.         LookupTable = packed array[0..255] of UnsignedByte;
  303.         TextBufType = packed array[1..MaxTextBufSize] of char;
  304.         SortArray = array[1..9] of integer;
  305.         StandardsArray = array[1..MaxStandards] of extended;
  306.         ResultsType = (NoResults, AreaT, LengthT, PointT);
  307.         MeasurementTypes = (AreaM, MeanM, StdDevM, xyLocM, ModeM, PerimeterM, IntDenM);
  308.         xyArray = array[1..MaxPolyVertices] of integer;
  309.         ValuesModeType = (NoValues, PixelValues, IndexValue, AngleValue, CountValues, WidthValues, xyValues, LengthValues);
  310.         TiffHdr = record
  311.                 ByteOrder: packed array[1..2] of char;
  312.                 Version: integer;
  313.                 FirstIFDOffset: LongInt;
  314.             end;
  315.         TiffEntry = record
  316.                 TagField: integer;
  317.                 ftype: integer;
  318.                 length: LongInt;
  319.                 offset: LongInt;
  320.             end;
  321.         pcItemType = (pcRadioButton, pcButton);
  322.         WhatToImportType = (ImportTIFF, ImportMCID, ImportPalette, ImportCustom);
  323.  
  324.     var
  325.         TraceInfo: str4;
  326.         finished: boolean;
  327.         trect, gmrect, GrayMapRect, GrayMapRect2, crect, HistoRect: rect;
  328.         gmSlide1, gmslide2, gmSlide1i, gmSlide2i, gmicon1, gmicon2: rect;
  329.         gmSlide1Loc: integer;
  330.         gmFixedSlope: boolean;
  331.         UpdateRegion: RgnHandle;
  332.         ToolWindow, GrayMapWindow, LUTWindow, ResultsWindow, HistoWindow, PlotWindow, PasteControl: WindowPtr;
  333.         watch: CursHandle;
  334.         Return, tab, BackSpace: char;
  335.         CharCount: LongInt;
  336.         ScreenPort: GrafPtr;
  337.         CScreenPort: cGrafPtr;
  338.         ticks: LongInt;
  339.         MonoFunction: ClutTable;
  340.         PaletteRec: record
  341.                 NumberOfColors: integer;
  342.                 RedData: ColorArray;
  343.                 GreenData: ColorArray;
  344.                 BlueData: ColorArray;
  345.             end;
  346.         Info: InfoPtr;
  347.         ToolCursor: array[ToolType] of Cursor;
  348.         PickerCursor, LUTCursor, gmCursor, CrossPlusCursor, CrossMinusCursor, GlassMinusCursor: Cursor;
  349.         CurrentTool, PreviousTool, FirstTool, LastTool: ToolType;
  350.         ToolRect: array[ToolType] of rect;
  351.         ToolChar, ToolCursorChar: array[ToolType] of char;
  352.         ToolTime, LutTime: longInt;
  353.         nPics: integer;
  354.         PicWindow: array[1..MaxPics] of WindowPtr;
  355.         ScreenWidth, ScreenHeight: integer;
  356.         ScreenBase: ptr;
  357.         ScreenRowBytes: LongInt;
  358.         Histogram: HistogramType;
  359.         ForegroundColor, BackgroundColor: integer;
  360.         CurrentColorIndex, ClipColorIndex: integer;
  361.         lines: array[1..nLineTypes] of rect;
  362.         CheckRect: rect;
  363.         LineWidth, LineIndex: integer;
  364.         StartOfLines: integer;
  365.         SaveInfo: InfoPtr;
  366.         MaskRgn: RgnHandle;
  367.         PlotPICT: PicHandle;
  368.         PlotLeft, PlotTop, PlotWidth, PlotHeight: integer;
  369.         PlotMin, PlotMax: extended;
  370.         PlotCount, PlotAvg: integer;
  371.         PlotData: LineType;
  372.         PlotMean: extended;
  373.         InvertPlots, AutoscalePlots, LinePlot, DrawPlotLabels, FixedSizePlot: boolean;
  374.         ProfilePlotMin, ProfilePlotMax: extended;
  375.         ProfilePlotWidth, ProfilePlotHeight: integer;
  376.         UndoBuf, ClipBuf, BigBuf: ptr;
  377.         ClipBufSize, UndoBufSize, BigBufSize: LongInt;
  378.         UndoInfoRec: PicInfo;
  379.         UndoInfo: InfoPtr;
  380.         CurrentUndoSize: LongInt;
  381.         AirbrushDiameter, AirbrushRadius, AirbrushRadius2: integer;
  382.         BrushHeight, BrushWidth: integer;
  383.         Settings: record
  384.                 sForegroundColor, sBackgroundColor: integer;
  385.                 sBrushHeight, sBrushWidth: integer;
  386.                 sAirbrushDiameter: integer;
  387.                 sLUTMode: LUTModeType;
  388.                 sColorStart, sColorWidth: integer;
  389.                 sCurrentFontID: integer;
  390.                 sCurrentStyle: style;
  391.                 sCurrentSize: integer;
  392.                 sTextJust: TextJustType;
  393.                 sTextBack: TextBackType;
  394.                 snExtraColors: integer;
  395.                 sExtraColors: ExtraColorsArray;
  396.                 sInvertVideo: boolean;
  397.                 sMeasurements: set of MeasurementTypes;
  398.                 sInvertPlots, sAutoScalePlots, sLinePlot, sDrawPlotLabels, sFixedSizePlot: boolean;
  399.                 sProfilePlotMin, sProfilePlotMax: extended;
  400.                 sProfilePlotWidth, sProfilePlotHeight: integer;
  401.                 snFrames: integer;
  402.                 sNewPicWidth, sNewPicHeight: integer;
  403.                 sBufferSize: LongInt;
  404.                 sMaxScionWidth: integer;
  405.                 sThresholdToForeground, sNonThresholdToBackground: boolean;
  406.                 sVideoChannel: integer;
  407.                 sWhatToImport: WhatToImportType;
  408.                 sImportCustomWidth, sImportCustomHeight: integer;
  409.                 sImportCustomOffset: LongInt;
  410.                 sWandAutoMeasure, sWandAutoNumber: boolean;
  411.             end;
  412.         CurrentFontID, CurrentSize, NumFontItems: integer;
  413.         CurrentStyle: Style;
  414.         InsertionPoint: point; {Offscreen coordinates}
  415.         IsInsertionPoint: boolean;
  416.         TextJust: TextJustType;
  417.         TextBack: TextBackType;
  418.         TextStr: str255;
  419.         TextRect: rect;
  420.         TextStart: point;
  421.         BlinkTime: LongInt;
  422.         pat: array[0..7] of pattern;
  423.         PatIndex: integer;
  424.         OpPending: boolean;
  425.         CurrentOp: OpType;
  426.         IsOK: boolean;
  427.         PaletteName: string[32];
  428.         PicWindowLeft, PicWindowTop: integer;
  429.         ClipBufInfoRec: PicInfo;
  430.         ClipBufInfo: InfoPtr;
  431.         MouseState: (NotInRoi, InRoi, DownInRoi);
  432.         MouseDownLoc, osMouseDownLoc: point;
  433.         OldRoiRect: rect;
  434.         WhatsOnClip: (Nothing, AColor, RectPic, NonRectPic, ImportedPic);
  435.         PasteMode: (NormalPaste, LiveSelection, PasteFromCamera);
  436.         ExtraColors: ExtraColorsArray;
  437.         nExtraColors: integer;
  438.         PasteTransferMode: integer;
  439.         cheight: integer;
  440.         ExtraColorsRect: array[1..MaxExtraPlus2] of rect;
  441.         ExtraColorsEntry: array[1..MaxExtraPlus2] of integer;
  442.         StretchMode: boolean;
  443.         IdentityFunction: boolean;
  444.         OldScrapCount: integer;
  445.         ScrapNotCleared, ClipboardConverted: boolean;
  446.         results: record
  447.                 n: LongInt;
  448.                 tmean, x, y, min, max, length, angle: extended;
  449.                 hloc, imin, imax, imode, imean: integer;
  450.             end;
  451.         FrameGrabber: (QuickCapture, Scion, NoFrameGrabber);
  452.         DTSlotBase, ScionSlotBase: LongInt;
  453.         ControlReg, ChannelReg: ptr;
  454.         Digitizing: boolean;
  455.         debugging: boolean;
  456.         NoInfo: InfoPtr;
  457.         NoInfoRec: PicInfo;
  458.         BlankLine: LineType;
  459.         UndoFromClip: boolean;
  460.         Thresholding, ThresholdToForeground, NonThresholdToBackground: boolean;
  461.         ThresholdStart, ThresholdEnd: integer;
  462.         ThresholdColor: RGBColor;
  463.         SaveCTable: ^MyCSpecArray;
  464.         BlankFieldInfo: InfoPtr;
  465.         BlankFieldMean: integer;
  466.         CameraInfo, DebugInfo, ScionInfo: InfoPtr;
  467.         InvertVideo: boolean;
  468.         VideoChannel: integer;
  469.         TextBufSize, TextBufColumn, TextBufLineCount: integer;
  470.         TextBufP: ^TextBufType;
  471.         TextOnClip: boolean;
  472.         BitInfoCount: integer;
  473.         nAreas, nAreas2, UnsavedAreas: integer;
  474.         nPoints, UnsavedPoints: integer;
  475.         nLengths, UnsavedLengths: integer;
  476.         Lengths: array[0..MaxLengths] of real;
  477.         TotalLength: real;
  478.         xLoc: array[1..MaxLocs] of integer;
  479.         yLoc: array[1..MaxLocs] of integer;
  480.         mean: array[0..MaxAreas] of real;
  481.         sd: array[0..MaxAreas] of real;
  482.         PixelCount: array[0..MaxAreas] of LongInt;
  483.         mode, IntegratedDensity, plength, xcenter, ycenter: array[0..MaxAreas] of real;
  484.         umean: array[0..MaxStandards] of real; {Uncalibrated means}
  485.         StandardValues: StandardsArray;
  486.         nStandards: integer;
  487.         value: array[0..255] of extended;
  488.         MinValue, MaxValue, FitGoodness, FitSD: extended;
  489.         PlotLeftMargin, PlotTopMargin, PlotBottomMargin, PlotRightMargin: integer;
  490.         WhatToUndo: (NothingToUndo, UndoEdit, UndoFlip, UndoRotate, UndoScale, UndoFilter, UndoPaste, UndoTransform, UndoClear, UndoMeasurement, UndoContrastEnhancement, UndoEqualization, UndoZoom, UndoPlot, UndoOutline);
  491.         WhatToCopy: (NothingToCopy, CopySelection, CopyCLUT, CopyGrayMap, CopyPlot, CopyHistogram, CopyAreas, CopyLengths, CopyPoints, CopyColor);
  492.         WhatToPrint: (NothingToPrint, PrintImage, PrintSelection, PrintAreas, PrintLengths, PrintPoints, PrintPlot, PrintHistogram);
  493.         PrintRecord: THPrint;
  494.         isLaserWriter: boolean;
  495.         printing, ShowingList, Copying: boolean;
  496.         HalftoneFrequency, HalftoneAngle: integer;
  497.         HalftoneDotFunction: boolean;
  498.         AppleMenuH, FileMenuH, EditMenuH, OptionsMenuH, FunctionsMenuH, BinaryMenuH, AnalysisMenuH, TextMenuH, FontMenuH, SizeMenuH, StyleMenuH, WindowsMenuH, UserMenuH: MenuHandle;
  499.         rleft, rtop: integer;
  500.         ListDone: boolean;
  501.         ListWindow: WindowPtr;
  502.         ScrollBar: ControlHandle;
  503.         ListTE: TEHandle;
  504.         ListPageSize: integer;
  505.         ListButton: array[1..4] of rect;
  506.         measuring: boolean;
  507.         Measurements: set of MeasurementTypes;
  508.         nMeasurements: integer;
  509.         ContinuousHistogram: boolean;
  510.         nFrames: integer;
  511.         PixelLength: extended;
  512.         ValuesMode: ValuesModeType;
  513.         xValueLoc, yValueLoc, zValueLoc: integer;
  514.         MenuBarHeight: integer;
  515.         NewPicWidth, NewPicHeight: integer;
  516.         RestoreUndoBuf: boolean;
  517.         WhatToOpen: (OpenImage, OpenPICT2, OpenTIFF, OpenMCID, OpenUnknown, OpenImported, OpenCustom);
  518.         WhatToImport: WhatToImportType;
  519.         ImportCustomWidth, ImportCustomHeight: integer;
  520.         ImportCustomOffset: LongInt;
  521.         TiffInfo: record
  522.                 Header: TiffHdr;   {8}
  523.                 nEntries: integer; {2}
  524.                 directory: array[1..7] of TiffEntry; {84}
  525.                 NextIFD: LongInt;  {4}
  526.                 filler: array[1..TiffFillerSize] of integer;
  527.             end;
  528.         IntelByteOrder: boolean;
  529.         BufferSize: LongInt;
  530.         MaxScionWidth: integer;
  531.         isSelectionTool: boolean;
  532.         SelectionMode: (NewSelection, AddSelection, SubSelection);
  533.         RoiMovementState: (Unconstrained, Constrained, ConstrainedH, ConstrainedV);
  534.         pcItem: array[1..npcItems] of record
  535.                 r: rect;
  536.                 itype: pcItemType;
  537.                 str: string[20];
  538.             end;
  539.         PictF: integer;
  540.         PictBuffer, curPictBufPtr: ptr;
  541.         BytesInPictBuffer: LongInt;
  542.         FitsInPictBuffer, RoiNudged, SavingOutline, RestoringOutline, GrayMapReady, RedoSelection: boolean;
  543.         ThresholdingMode: (LutThresholding, GrayMapThresholding, BinaryImage);
  544.         WandAutoMeasure, WandAutoNumber: boolean;
  545.         RunningOn030: boolean;
  546.         WhiteRGB, BlackRGB: RGBColor;
  547.  
  548.  
  549. implementation
  550.  
  551. end.